<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0"
        />
        <title>Document</title>
    </head>
    <body>
        <script>
            const obj = {}

            obj.valueOf = function () {
                console.log('value Of')
                return ''
            }

            obj.toString = function () {
                console.log('to string')
                return 'hello world!'
            }

            console.log(Number(obj))
        </script>
    </body>
</html>
